﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using SiGeSIB.GUI.Common;
using SiGeSIB.GUI.Management;
using SiGeSIB.Data.Management;

namespace SiGeSIB.GUI.Main
{
	public partial class UManagementControl : UserControl
	{
		public UManagementControl()
		{
			InitializeComponent();
		}

		#region Member
		private void lnkManageMembers_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
		{
			Manager.Instance.CreateTab(new FManageMembers(EContributorType.Member));
		}
		private void lnkManageDistant_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
		{
			Manager.Instance.CreateTab(new FManageMembers(EContributorType.Away));
		}
		private void lnkAddMember_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
		{
			Manager.Instance.CreateTab(new FEditMember(EFormState.Edit, EContributorType.Member, -1));
		}
		#endregion
		
		#region Visitor
		private void lnkManageVisitor_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
		{
			Manager.Instance.CreateTab(new FManageMembers(EContributorType.Visitor));
		}
		private void lnkAddVisitor_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
		{
			Manager.Instance.CreateTab(new FEditMember(EFormState.Edit, EContributorType.Visitor, -1));
		}
		#endregion
		
		#region Contributor
		private void lnkManageContributor_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
		{
			Manager.Instance.CreateTab(new FManageMembers(EContributorType.Contributor));
		}
		private void lnkAddContributor_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
		{
			Manager.Instance.CreateTab(new FEditMember(EFormState.Edit, EContributorType.Contributor, -1));
		}
		#endregion		
	}
}
